const seeds=[110392171,80032060,143869365,71279360,178261512,189169766,161567106,152463396,51068844,159763746,157525656,188339326,6304182,55308330,163599711,203204849,3646578,12247254,96255939,93652435,193950692,108555922,2609565,117954243,142324954,184643946,106980263,38776654,70909127,197972984]
var line = 0
var seed = seeds[line]
ServerEvents.recipes(event => {
    event.remove({type:'createoreexcavation:drilling'})
    event.remove({type:'createoreexcavation:vein'})
    const vein = event.recipes.createoreexcavation.vein
    const drilling = event.recipes.createoreexcavation.drilling
    const l_ores = ['hematite','bismuthinite','garnierite','limonite','magnetite','tetrahedrite','native_gold','sphalerite','malachite']
    const ores = ['cryolite','sulfur','borax','bituminous_coal','pyrite','emerald','diamond','lignite','graphite','lapis_lazuli']

    l_ores.forEach(item =>{
        seed = seeds[line]
        vein(Text.translate(`${item}`),`tfc:ore/normal_${item}`)
        .placement(24, 4, seed)
        .id(`kubejs:${item}_vein`)
        .priority(100)                                                    // 多个矿物都命中同一个区块时，采用数值高的矿脉
        .alwaysFinite()                                              // 矿脉不是无限开采的，不添加默认为 .alwaysInfinite() 可无限开采
        .veinSize(2.5, 5)                                            // 矿脉大小区间，3000-8500； 当矿脉不是无限开采时生效
        .biomeBlacklist['minecraft:is_nether','minecraft:is_end'] 

        drilling([`tfc:ore/normal_${item}`, Item.of(`tfc:ore/rich_${item}`).withChance(0.15),Item.of(`tfc:ore/poor_${item}`).withChance(0.15)], `kubejs:${item}_vein`, 600).id(`${item}_dri1`).fluid('immersivepetroleum:diesel 5')
        .stress(512) 
        drilling([`tfc:ore/normal_${item}`, Item.of(`tfc:ore/rich_${item}`).withChance(0.15),Item.of(`tfc:ore/poor_${item}`).withChance(0.15)], `kubejs:${item}_vein`, 600).id(`${item}_dri2`).fluid('immersiveengineering:biodiesel 10')
        .stress(512)
        line++
    });
    ores.forEach(item =>{
        seed = seeds[line]
        vein(Text.translate(`${item}`),`tfc:ore/${item}`)
        .placement(16, 8, seed)
        .id(`kubejs:${item}_vein`)
        .priority(100)                                  
        .alwaysFinite()                                              
        .veinSize(2.5, 5)                                            
        .biomeBlacklist['minecraft:is_nether','minecraft:is_end']  

        drilling([`tfc:ore/${item}`], `kubejs:${item}_vein`, 800).id(`${item}_dri1`).fluid('minecraft:lava 10')
        .stress(1024) 
        line++
    });
    seed = seeds[line]
    vein(Text.translate(`uraninite`),`tfc_ie_addon:ore/normal_uraninite`)
    .placement(48, 1, seed)
    .id(`kubejs:uraninite_vein`)
    .priority(20)                                                
    .alwaysFinite()                                            
    .veinSize(1,2)                                          
    .biomeBlacklist['minecraft:is_nether','minecraft:is_end']      

    drilling([`tfc_ie_addon:ore/normal_uraninite`, Item.of(`tfc_ie_addon:ore/rich_uraninite`).withChance(0.15),Item.of(`tfc_ie_addon:ore/poor_uraninite`).withChance(0.15)], `kubejs:uraninite_vein`, 800).id(`uraninite_dri1`).fluid('immersivepetroleum:diesel 5')
    .stress(512) 
    drilling([`tfc_ie_addon:ore/normal_uraninite`, Item.of(`tfc_ie_addon:ore/rich_uraninite`).withChance(0.15),Item.of(`tfc_ie_addon:ore/poor_uraninite`).withChance(0.15)], `kubejs:uraninite_vein`, 800).id(`uraninite_dri2`).fluid('immersiveengineering:biodiesel 10')
    .stress(512) 
    
    line++
    seed = seeds[line]
    vein(Text.translate(`bauxite`),`tfc_ie_addon:ore/normal_bauxite`)
    .placement(24, 8, seed)
    .id(`kubejs:bauxite_vein`)
    .priority(120)                                                
    .alwaysFinite()                                            
    .veinSize(4,7.5)                                          
    .biomeBlacklist['minecraft:is_nether','minecraft:is_end']      

    drilling([`tfc_ie_addon:ore/normal_bauxite`, Item.of(`tfc_ie_addon:ore/rich_bauxite`).withChance(0.15),Item.of(`tfc_ie_addon:ore/poor_bauxite`).withChance(0.15)], `kubejs:bauxite_vein`, 600).id(`bauxite_dri1`).fluid('immersivepetroleum:diesel 5')
    .stress(512) 
    drilling([`tfc_ie_addon:ore/normal_bauxite`, Item.of(`tfc_ie_addon:ore/rich_bauxite`).withChance(0.15),Item.of(`tfc_ie_addon:ore/poor_bauxite`).withChance(0.15)], `kubejs:bauxite_vein`, 600).id(`bauxite_dri2`).fluid('immersiveengineering:biodiesel 10')
    .stress(512) 
})
